package dshop.model.push;

import java.util.ArrayList;
import java.util.List;

import appbase.jfinal.ext.BaseModel;

public class UserPushAccount extends BaseModel<UserPushAccount>{
	
	private static final long serialVersionUID = -6967680902549117464L;
	
	public static final UserPushAccount dao = new UserPushAccount();

	//1 安卓；2 iOS
	public static final int PLATFORM_ANDROID = 1;
	public static final int PLATFORM_IOS = 2;
	
	
	/**
	 * @return [{ id, userId, pushAccount, platform }]
	 */
	public static List<UserPushAccount> findIn(List<Integer> userIdList) 
	{
		if (userIdList == null || userIdList.isEmpty())
		{
			return new ArrayList<UserPushAccount>();
		}
		
		String sql = " select id, userId, pushAccount, platform from user_push_account where userId in (??) ";
		sql = dao.buildSqlHasIn(sql, userIdList);
		return dao.find(sql);
	}

	
	
	
}
